package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by VegetaKo on 2016/9/20.
 */
@Entity
@DynamicInsert
@Table(name = "l2r_ipms2_group",catalog = "")
public class L2RIpms2Group extends BaseEntity{
    private Long hotelGroupId;
    private String hotelGroupName;
    private String pmsHotelGroupCode;

    @Basic
    @Column(name = "hotel_group_id", nullable = false, length = 20)
    public Long getHotelGroupId() {
         return hotelGroupId;
    }

    public void setHotelGroupId(Long hotelGroupId) {
        this.hotelGroupId = hotelGroupId;
    }

    @Basic
    @Column(name = "pms_hotel_group_code", nullable = false, length = 20)
    public String getPmsHotelGroupCode() {
        return pmsHotelGroupCode;
    }

    public void setPmsHotelGroupCode(String pmsHotelGroupCode) {
        this.pmsHotelGroupCode = pmsHotelGroupCode;
    }

    @Basic
    @Column(name = "hotel_group_name", nullable = true, length = 60)
    public String getHotelGroupName() {
        return hotelGroupName;
    }

    public void setHotelGroupName(String hotelGroupName) {
        this.hotelGroupName = hotelGroupName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RIpms2Group that = (L2RIpms2Group) o;

        if (hotelGroupId != null ? !hotelGroupId.equals(that.hotelGroupId) : that.hotelGroupId != null) return false;
        if (hotelGroupName != null ? !hotelGroupName.equals(that.hotelGroupName) : that.hotelGroupName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = hotelGroupId != null ? hotelGroupId.hashCode() : 0;
        result = 31 * result + (hotelGroupName != null ? hotelGroupName.hashCode() : 0);
        return result;
    }
}
